package com.daz.student.inter.action;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import oracle.net.aso.q;

import org.springframework.beans.factory.annotation.Autowired;

import com.daz.common.publicDict.pojo.publicDictPojo;
import com.daz.student.pojo.studentPojo;
import com.daz.student.server.IStudentServer;
import com.daz.teacher.teacherInfo.pojo.teacher;
import com.daz.teacher.teacherInfo.server.iTeacherServer;
import com.github.pagehelper.PageInfo;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
public class TeacherAction extends ActionSupport{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Autowired
	private iTeacherServer teacherServer;
	
	private Boolean success;
	private String msg;
	private List<teacher> list;

	public String getTeacherInfoByStudentId(){
		Map<String, Object> searchConditionMap = new HashMap<String, Object>();
		Map session = ActionContext.getContext().getSession();
		searchConditionMap.put("studentId", session.get("studentId"));
		try {
			list = teacherServer.getTeacherInfo(searchConditionMap);
			this.setSuccess(true);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			this.setSuccess(false);
			this.setMsg("导师信息查询失败！");
		}
		return SUCCESS;
	}
	
	public Boolean getSuccess() {
		return success;
	}

	public void setSuccess(Boolean success) {
		this.success = success;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public List<teacher> getList() {
		return list;
	}

	public void setList(List<teacher> list) {
		this.list = list;
	}


	
}


